package MyThreadPool1;

public class Test {
    public static void main(String[] args) {
        MyThreadPool pool = new MyThreadPool(4);
        for (int i = 0; i < 1000; i++) {
            int id = i;
            pool.submit(() -> {
                System.out.println("执行任务" + id + ", " + Thread.currentThread().getName());
            });
        }
    }
}
